import {Navigate} from 'react-router-dom'
import {RouterType} from '../types'
import {
  BankOutlined,
  HomeOutlined,
  UnorderedListOutlined,
  HeatMapOutlined,
  SettingOutlined
} from '@ant-design/icons';
import Login from '../page/Login'
import Sigin from '../page/Sigin'
import Home from '../page/Home'
 

import HomeC from '../page/Home/Home'
import List from '../page/Home/List'
import Tb from '../page/Home/Tb'
import Set from '../page/Home/Set'

import SetOne from '../page/Home/Set/SetOne'
import SetTwo from '../page/Home/Set/SetTwo'

const Routers:RouterType[]=[{
    path:'/',
    element:<Navigate to="/login"/>
},{
    path:'/login',
    meate:"登录",
    element:<Login/>
},{
    path:"/sigin",
    meate:'注册',
    element:<Sigin/>
},{
    path:"/home",
    meate:'首页',
    element:<Home/>,
    icon:<HomeOutlined />,
    children:[{
        path:"/home/home",
        meate:"首页",
        element:<HomeC/>,
        icon:<BankOutlined />
    },{
        path:"/home/list",
        meate:"列表",
        element:<List/>,
        icon:<UnorderedListOutlined />
    },{
        path:"/home/tb",
        meate:"图表",
        element:<Tb/>,
        icon:<HeatMapOutlined />,
         
    },{
        path:"/home/set",
        meate:"设置",
        element:<Set/>,
        icon:<SettingOutlined />,
        children:[{
            path:"/home/set/setone",
            meate:"用户列表",
            element:<SetOne/>,
        },{
            path:"/home/set/settwo",
            meate:"设置",
            element:<SetTwo/>,
        }]
    }]
}]
export default Routers